package com.inifitness.tenant.core.config.mp.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * MP数据权限注解
 *
 * @author sunjinfeng
 * @since 2024/04/18 11:00:00
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD})
public @interface DataPermission {

  /**
   * 数据权限 {@link com.baomidou.mybatisplus.extension.plugins.inner.DataPermissionInterceptor}
   */
  String deptAlias() default "";

  String deptIdColumnName() default "dept_id";

  String userAlias() default "";

  String userIdColumnName() default "create_by";
}

